﻿using System;
using System.Collections.Generic;

using System.Text;
using QUANLYCHAMCONG.BL.Entities;
using QUANLYCHAMCONG.DAO.DAO;
using System.Data;

namespace QUANLYCHAMCONG.BL.BUS
{
    public class TANGCABUS
    {
        public TANGCABUS() { }
        public static bool Insert(TANGCA tc)
        {
            TANGCADAO dao = new TANGCADAO();
            return dao.Insert(tc);
        }
        public static bool Update(TANGCA tc)
        {
            TANGCADAO dao = new TANGCADAO();
            return dao.Update(tc);
        }
        public static bool Delete(TANGCA tc)
        {
            TANGCADAO dao = new TANGCADAO();
            return dao.Delete(tc);
        }
        public static DataTable SelectAll()
        {
            TANGCADAO dao = new TANGCADAO();
            return dao.SelectALL();
        }
        public static DataTable SelectPK(TANGCA tc)
        {
            TANGCADAO dao = new TANGCADAO();
            return dao.SelectByPK(tc);
        }
        public static string GetID()
        {
            TANGCADAO dao = new TANGCADAO();
            return "TC" + dao.GetID().ToString();
        }
        public static DataTable SelectAllDiTre()
        {
            TANGCADAO dao = new TANGCADAO();
            return dao.SelectALLDiTre();
        }
        public static DataTable SelectAllVeSom()
        {
            TANGCADAO dao = new TANGCADAO();
            return dao.SelectALLVeSom();
        }
        public static DataTable CheckExits(TANGCA tc)
        {
            TANGCADAO dao = new TANGCADAO();
            return dao.CheckExits(tc);
        }
        public static DataTable SelectAllPhepNam()
        {
            TANGCADAO dao = new TANGCADAO();
            return dao.SelectALLPhepNam();
        }
        public static DataTable SelectAllDiCongtac()
        {
            TANGCADAO dao = new TANGCADAO();
            return dao.SelectALLDiCongTac();
        }
    }
}
